package com.study.exception;
import com.study.utils.ResultCodeEnum;
import lombok.Data;

@Data
public class DigitalException extends RuntimeException {
    private Integer code;

    public DigitalException(Integer code, String message) {
        super(message);
        this.code = code;
    }
    public DigitalException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
